package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the TA_TABL database table.
 * 
 */
@Embeddable
public class TaTablPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private String vaColu;
	private String coColu;

    public TaTablPK() {
    }

	@Column(name="VA_COLU", unique=true, nullable=false, length=2)
	public String getVaColu() {
		return this.vaColu;
	}
	public void setVaColu(String vaColu) {
		this.vaColu = vaColu;
	}

	@Column(name="CO_COLU", unique=true, nullable=false, length=17)
	public String getCoColu() {
		return this.coColu;
	}
	public void setCoColu(String coColu) {
		this.coColu = coColu;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TaTablPK)) {
			return false;
		}
		TaTablPK castOther = (TaTablPK)other;
		return 
			this.vaColu.equals(castOther.vaColu)
			&& this.coColu.equals(castOther.coColu);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.vaColu.hashCode();
		hash = hash * prime + this.coColu.hashCode();
		
		return hash;
    }
}